import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/LoanListItem.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/NavigationBar.dart';
import 'package:heyangkuaidai/DemonStrateModule/FirstPage.dart';
import 'package:heyangkuaidai/DemonStrateModule/SelectRepayPage.dart';
class HoldLoanPage extends StatefulWidget {
  @override
  _HoldLoanPageState createState() => _HoldLoanPageState();
}

class _HoldLoanPageState extends State<HoldLoanPage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 375, height: 667, allowFontScaling: true);
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body: Column(
        children: [
          SizedBox(height: MediaQuery.of(context).padding.top,),
          NavigationBar(false,title: "福祥e贷",),
          Container(
            width: ScreenUtil.screenWidth,
            height: ScreenUtil.screenHeight-ScreenUtil().setWidth(320)-MediaQuery.of(context).padding.top,
            child: ListView.separated(
              // ignore: missing_return
              itemBuilder: (context, itemIndex){
                return InkWell(
                  onTap: (){
                     Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) => new SelectRepayPage(),
                  ),
                );

                  },
                  child:LoanListItem(),
                );
                // ignore: missing_return
              },separatorBuilder: (context, itemIndex){
              return Container(height: ScreenUtil().setWidth(20),);
            }, itemCount: 1,
              padding: EdgeInsets.only(top:ScreenUtil().setWidth(20),left: ScreenUtil().setWidth(15),right: ScreenUtil().setWidth(15)),),
          ) ,

        ],
      ),
    );
  }
}
